package com.example.demo2;

import com.example.demo2.entity.UserInfo;
import com.example.demo2.service.Level1AuditService;
import com.example.demo2.service.Level2AuditService;
import com.example.demo2.service.Level3AuditService;

public class DemoTest {


    public static void main(String[] args) {

        AuditHandler auditHandler = new Level1AuditService();

        // 第二级审核
        AuditHandler auditService = new Level2AuditService();
        auditHandler.setAuditHandler(auditService);

        // 第三级别审核
        AuditHandler level3AuditService = new Level3AuditService();
        auditService.setAuditHandler(level3AuditService);

        UserInfo userInfo = new UserInfo();
        userInfo.setUserName("张三");
        userInfo.setUserId("001");
        auditHandler.audit(userInfo);

    }

}
